using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class mtn_utilizationMap : EntityTypeConfiguration<mtn_utilization>
    {
        public mtn_utilizationMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.Form)
                .HasMaxLength(50);

            this.Property(t => t.Specifier)
                .HasMaxLength(50);

            this.Property(t => t.Duration)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.Machine)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("mtn_utilization");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.User).HasColumnName("User");
            this.Property(t => t.Startdate).HasColumnName("Startdate");
            this.Property(t => t.EndDate).HasColumnName("EndDate");
            this.Property(t => t.Form).HasColumnName("Form");
            this.Property(t => t.Specifier).HasColumnName("Specifier");
            this.Property(t => t.Duration).HasColumnName("Duration");
            this.Property(t => t.Machine).HasColumnName("Machine");
        }
    }
}
